package com.java01.apache.commons.config;

import java.io.File;

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.HierarchicalINIConfiguration;

public class SaveIniConfig {

	public static void main(String[] args){
		File configFile = new File("C:\\config.ini");
		
		HierarchicalINIConfiguration iniConfig = new HierarchicalINIConfiguration();
		
		iniConfig.setProperty("java01.author", "Atoo");
		iniConfig.setProperty("java01.url", "http://www.java01.com");
		
		try {
			iniConfig.save(configFile);
		} catch (ConfigurationException e) {
			System.err.println(e.getMessage());
		}
	}
}
